<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./../../template.xhtml">

            <ui:define name="title">CS - Membro</ui:define>
            
            <ui:define name="mainMenu">
                <ui:include src="./../../mainMenu.xhtml" />
            </ui:define>
            
            <ui:define name="subtitle"><h:outputLabel value="Tesouraria > Movimentação Diária"/></ui:define>

            <ui:define name="leftMenu">
                <ui:include src="menuTesouraria.xhtml" />
            </ui:define>
            
            <ui:define name="content">

                <p/>
                <h:form>                    
                    <div align="center">
                        <h:panelGrid columns="25">
                            | 
                            <h:commandLink value="Janeiro"/> |
                            <h:commandLink value="Fevereiro"/> |
                            <h:commandLink value="Março"/> |
                            <h:commandLink value="Abril"/> |
                            <h:commandLink value="Maio"/> |
                            <h:commandLink value="Junho"/>|
                            <h:commandLink value="Julho"/> |
                            <h:commandLink value="Agosto"/> |
                            <h:commandLink value="Setembro"/> |
                            <h:commandLink value="Outubro"/> |
                            <h:commandLink value="Novembro"/> |
                            <h:commandLink value="Dezembro"/> |
                        </h:panelGrid>
                    </div>
                    <center>
                    <h4><h:outputLabel value="Inclusão de Lançamento"/></h4>
                    </center>
                    
                    <h:panelGrid columns="5">

                        <h:panelGroup>
                            <h:outputLabel value="Data"/>
                            <h:inputText id="dataLancamentoID" size="10"/>
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputLabel value="Descrição"/>
                            <h:inputText id="descricaoLancamentoID" size="30"/>
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputLabel value="Código"/>
                            <h:inputText id="codigoLancamentoID" size="5"/>
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputLabel value="Valor"/>
                            <h:inputText id="valorLancamentoID" size="10"/>
                        </h:panelGroup>
                            <h:commandLink action="movimentacaoDiaria">
                                <h:graphicImage library="imagens" name="create.ico" alt="Adicionar" title="Adicionar"/>
                            </h:commandLink> 
 
                    </h:panelGrid>
   
                    <!-- BEGIN - tabela prime faces -->                  
                    <p:dataTable id="dataTable" var="lancamento" value="#{tesourariaMB.movimentacao}"  
                                  paginator="true" rows="10"  
                                  paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                  rowsPerPageTemplate="50, 100, 200">  

                        <p:column sortBy="#{movimentacao.data}">  
                             <f:facet name="header">  
                                 <h:outputText value="Data" />  
                             </f:facet>  
                             <h:outputText value="#{movimentacao.data}" />  
                         </p:column>
                        
                        <p:column sortBy="#{movimentacao.descricao}">  
                             <f:facet name="header">  
                                 <h:outputText value="Descrição" />  
                             </f:facet>  
                             <h:outputText value="#{movimentacao.descricao}" />  
                         </p:column>  

                        <p:column sortBy="#{movimentacao.codigo}">  
                             <f:facet name="header">  
                                 <h:outputText value="Código" />  
                             </f:facet>  
                             <h:outputText value="#{movimentacao.codigo}" />  
                         </p:column> 
                        
                        <p:column sortBy="#{movimentacao.tipo}">  
                             <f:facet name="header">  
                                 <h:outputText value="Tipo" />  
                             </f:facet>  
                             <h:outputText value="#{movimentacao.tipo}" />  
                         </p:column>
                        
                        <p:column sortBy="#{movimentacao.valor}">  
                             <f:facet name="header">  
                                 <h:outputText value="Valor" />  
                             </f:facet>  
                             <h:outputText value="#{movimentacao.valor}" />  
                         </p:column>

                         <p:column>  
                             <f:facet name="header">  
                                 <h:outputText value="Ação" />  
                             </f:facet>  
                             <h:commandLink action="#{tesourariaMB.remover}" >
                                 <h:graphicImage library="imagens" name="delete.ico" alt="Remover" title="Remover"/>
                             </h:commandLink> 
                         </p:column>  

                    </p:dataTable> 
                    <!-- END - tabela prime faces -->

                    <h:panelGrid columns="4" >
                        <h:panelGroup>
                            <h:outputLabel value="Total de Entradas"/><br/>
                            <h:inputText id="totalEntradaID" size="15" readonly="true"/>
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputLabel value="Total de Saidas"/><br/>
                            <h:inputText id="totalSaidaID" size="15" readonly="true"/>                            
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputLabel value="Previsão de Saida"/><br/>
                            <h:inputText id="previsaoSaidaID" size="15" readonly="true"/>
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputLabel value="Total em Caixa"/><br/>
                            <h:inputText id="totalCaixa" size="15" readonly="true"/>
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputLabel value="Total Real"/><br/>
                            <h:inputText id="totalReal" size="15" readonly="true"/>
                        </h:panelGroup>
                    </h:panelGrid>    

                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>